<%--
  Created by IntelliJ IDEA.
  User: 墨墨之家
  Date: 2021/11/3
  Time: 16:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
多少<html>
<head>
    <title>Title</title>
    <%@include file="/WEB-INF/common/head.jsp" %>
    <script type="text/javascript">
        $(function () {
            $("#exampleInputPassword1").blur(function () {
                var loginAcct = this.value;
                $.post("admin/to/isExists.json", "loginAcct=" + loginAcct, function (data) {
                    $("#errorMsg").text(data);
                }, "text")
            })
            $(".btn btn-success").click(function () {
                var val = $("#exampleInputPassword1").val();
                var test1 = /^[a-z0-9_-]{3,16}$/;
                if (!test1.test(val)) {
                    $("#errorMsg").text("用户名输入的格式有误")
                    return false;
                }
                var pass = $("#exampleInputPassword3").val();
                var test2 = /^[a-z0-9_-]{6,18}$/;
                if (!test2.test(pass)) {
                    $("#errorMsg").text("密码最低不能少于6个字符")
                    return false;
                }
                $("#errorMsg").text("");
            })
            $("#aBtn").click(function () {
                window.history.back();
            })

        })
    </script>
</head>
<body>
<%--静态包含--%>
<%@include file="/WEB-INF/common/nav.jsp" %>

<div class="container-fluid">
    <div class="row">
        <%--静态包含--%>
        <%@include file="/WEB-INF/common/sidebar.jsp" %>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
            <ol class="breadcrumb">
                <li><a href="index.jsp">首页</a></li>
                <li><a id="aBtn" href="">数据列表</a></li>
                <li class="active">新增</li>
            </ol>
            <div class="panel panel-default">
                <div class="panel-heading">表单数据
                    <div style="float:right;cursor:pointer;" data-toggle="modal" data-target="#myModal"><i
                            class="glyphicon glyphicon-question-sign"></i></div>
                </div>

                <div class="panel-body">
                    <form action="admin/add/to/admin-add.html" method="post" role="form">
                        <div class="form-group">
                            <label for="exampleInputPassword1">登陆账号&nbsp;&nbsp;</label> <span id="errorMsg"
                                                                                              style="color: red;align-content: center"></span>

                            <input type="text" class="form-control" name="loginAcct" id="exampleInputPassword1"
                                   placeholder="请输入登陆账号">
                        </div>
                        <div class="form-group">
                            <label for="exampleInputPassword1">用户名称</label>
                            <input type="text" name="userName" class="form-control" id="exampleInputPassword2"
                                   placeholder="请输入用户名称">
                        </div>
                        <div class="form-group">
                            <label for="exampleInputPassword1">用户密码</label>
                            <input type="password" name="userPswd" class="form-control" id="exampleInputPassword3"
                                   placeholder="请输入密码">
                        </div>
                        <div class="form-group">
                            <label for="exampleInputEmail1">邮箱地址</label>
                            <input type="email" name="email" class="form-control" id="exampleInputEmail1"
                                   placeholder="请输入邮箱地址">
                            <p class="help-block label label-warning">请输入合法的邮箱地址, 格式为： xxxx@xxxx.com</p>
                        </div>
                        <button type="submit" class="btn btn-success"><i class="glyphicon glyphicon-plus"></i> 新增
                        </button>
                        <button type="reset" class="btn btn-danger"><i class="glyphicon glyphicon-refresh"></i> 重置
                        </button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<%--<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">--%>
<%--    <div class="modal-dialog">--%>
<%--        <div class="modal-content">--%>
<%--            <div class="modal-header">--%>
<%--                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span--%>
<%--                        class="sr-only">Close</span></button>--%>
<%--                <h4 class="modal-title" id="myModalLabel">帮助</h4>--%>
<%--            </div>--%>
<%--            <div class="modal-body">--%>
<%--                <div class="bs-callout bs-callout-info">--%>
<%--                    <h4>测试标题1</h4>--%>
<%--                    <p>测试内容1，测试内容1，测试内容1，测试内容1，测试内容1，测试内容1</p>--%>
<%--                </div>--%>
<%--                <div class="bs-callout bs-callout-info">--%>
<%--                    <h4>测试标题2</h4>--%>
<%--                    <p>测试内容2，测试内容2，测试内容2，测试内容2，测试内容2，测试内容2</p>--%>
<%--                </div>--%>
<%--            </div>--%>
<%--            <!----%>
<%--            <div class="modal-footer">--%>
<%--              <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>--%>
<%--              <button type="button" class="btn btn-primary">Save changes</button>--%>
<%--            </div>--%>
<%--            -->--%>
<%--        </div>--%>
<%--    </div>--%>
<%--</div>--%>

</div>
</div>

</body>
</html>
